<template>
    <div>
        <p>{{ compute }}</p>
        <p>{{ compute }}</p>
        <p>{{ sumnum() }}</p>
        <p>{{ sumnum() }}</p>

    </div>
</template>

<script setup>
import { ref,computed } from 'vue';

const studentData = ref([
    {id:1,name:"张三",age:20},
    {id:2,name:"张",age:17},
    {id:3,name:"三",age:18}
])
const num = ref(100);
const compute = computed(()=>{
    console.log("计算属性调用");
    return num.value*3/4+100;
})

function sumnum(){
    console.log("函数被调用");
    return num.value*3/4+100;
}

</script>

<style scoped>

</style>